Lock profiling enables you to understand the lock contention and blocking thread behavior of your applications over time. It helps you identify method calls in the context within which most locks for resources were allocated and combine this information with the number of allocated objects.
- Go to Configurations
> Actions > Lock Profiler, the Lock Profiler window is displayed.
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-118-Lock-Profiler.png)
2. Click the Add New Session button , and the Topology Details window is displayed.
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-119-Topology-Details-Window-1024x498.png)
3. Navigate to the instance via the Topology tree and click the Mutex Lock The Mutex Lock Profiling Session Configuration window is displayed.
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-120-Mutex-lock-Profiling-Session-Configuration-Window.png)
4.Provide the following configuration details:
General
- Session Name: Name of the mutex lock profiling session.
- Duration: Total duration of the session in minutes. Default – 30 minutes, Minimum – 5 minutes, and Maximum – 120 minutes.
- Session Overhead: Number of sessions to be executed per minute. Low (10 sessions/minute), Medium (20 sessions/minute), or High (30 sessions/minute). You can also choose any intermediary values (sessions/minute).
- of Top Mutex Lock to capture: Number of top mutex locks to be captured
- Description: Description of the mutex locks.
Advanced
- Top N Mutex Lock Find Duration: Time of pass 1 from the total duration (% of total session time) in seconds. Default – 30%, Minimum – 10%, Maximum – 50%.
- Total No. Mutex Lock to capture: Total number of mutex locks to analyze. Default – 20, Minimum – 5, Maximum – 1000.
- Total No. of threads to capture: Total number of threads to analyze for mutex locks. Default – 100, Minimum – 10, Maximum – 1000.
- Total No. of stack trace to capture: Total stack trace during the session. Default – 1000, Minimum – 100, Maximum – 10000.
5. After the configuration, when you click the Start button, a new session of Mutex Lock starts. You can view all the sessions in the Mutex Lock profiling window.
Note:
- When any mutex session is started, a running icon is displayed, which denotes the session is running for Mutex lock.
- You can delete a session by clicking the
button.
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-121-1024x358.png)
6. This window displays the following details:
- Top Blocking Locks
- Top Blocked Threads
- Top Blocking Threads
Top Blocking Locks
Class Data
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-122-Class-Data-Top-Blocking-Locks.png)
Statistics
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-123-Statistics-Top-Blocking-Locks.png)
Top Blocked Threads
Class Data
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-124-Class-Data-Top-Blocked-Threads.png)
Statistics
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-125-Statistics-Top-Blocked-Threads.png)
Top Blocking Threads
Thread Data
![](https://docs.cavisson.com/wp-content/uploads/2023/02/Figure-126-Thread-Data-Top-Blocking-Thread.png)
Statistics